Skip to content

Fix/character prefs not loading#261

Open
BartDrown wants to merge 3 commits intoMonkestation:masterfrom
BartDrown:fix/character-prefs-not-loading
Open

Fix/character prefs not loading#261
BartDrown wants to merge 3 commits intoMonkestation:masterfrom
BartDrown:fix/character-prefs-not-loading

Conversation

@BartDrown
Copy link

About The Pull Request

This PR attempts to fix character preferences/setup on both Linux and Windows.
This code should clear all handles to files preventing file lock state on Linux.
Additionaly, slots were not correctly loaded due to bug with determining which character prefs version is used, in which case system always attempted to load old prefs, despite new being available.

This PR additionally fixes skin tone issue. Skin tone after change in character setup UI wasn't properly displayed if not save explicitly to slot and reloaded.

Why It's Good For The Game

If those changes work, they should fix issue with no player prefs being saved/loaded on live server.

Testing

Those changes would require not-so extensive testing, but at least sanity checkup on live server, before actual launch, to avoid potential issues or data corruption.

My local tests went good, slots are saved, pesistent across multiple instance launches, skin tone changes after changing in UI, no lock state happening (though I'm testing it on Windows, so it might not be the same for live server working on Linux)
image

Changelog

🆑
fix: character preferences not saving due to file lock
fix: character prefs not loading
fix: skin tone not changing in character setup menu
/:cl:



character.update_body(0)
character.force_update_limbs()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not move this. please move it back. it was part of my mannequin optimization pr.

Copy link
Author

@BartDrown BartDrown Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.
How about iterating over organs and using sync_colour_to_human?
Would that also be too costly?
Probably I could fake fix it with slot reload or some additional flag, but I guess that would add up to complexity.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, I'm dumb, I should just rebuild organs on new skintone with existing flag

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed that, also updated max skin tone darkness to 225, to be consistent with description

…hange rebuild_organs, adjust max tone settings to reflect description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants